package me.helllp.book.netty.step01;

public class Worker {
	public void doWork(){
		Fetch fetch = new MyFetch(new Data(6,2));
		
		fetch.fetchData(new FetchCallback() {
			
			@Override
			public void onError(Throwable cause) {
				System.out.println("发生错误：" + cause.getMessage());
			}
			
			@Override
			public void onData(Data d) throws Exception {
				System.out.println(d);
			}
		});
	}
	
	public static void main(String[] args) {
		Worker work = new Worker();
		work.doWork();
	}
}
